const cloud = require('wx-server-sdk')
cloud.init({
  env: "yiliaojiufeng-6gt0kj1l1df8b7b7"
})
const db = cloud.database()
exports.main = async (event, context) => {
  console.log(event.name,event.password)
  return await db.collection('admin').where({
    name: event.name,
    password: event.password
  }).count()
}